//created by: Joanna Tan    
Ext.define("MajorProjectSenchaTouch.view.SearchModule.DisplayResult", {
    extend: 'Ext.Container',
    requires:[
    'MajorProjectSenchaTouch.view.SearchModule.ResultList',
    'MajorProjectSenchaTouch.view.SearchModule.ResultInfoDisplay',
    ],
    xtype: 'searchpage',
    id: 'searchView',
    config: {
        style: 'background-color: #343433',
        cls: 'backgroundRightPanel',
        layout:{
            type:'fit'
        },
        items:[
        {
            xtype: 'panel',
            id: 'displayResMainPan',
            docked: 'top',
            layout:
            {
                type: 'hbox'
            },
            items:[
            {
                xtype: 'panel',
                docked: 'top',
                layout:
                {
                    type: 'vbox'
                },
                items:[
                {
                    xtype: 'resultinfodisplay'
                },
                {
                    xtype: 'panel',
                    items:[{
                        xtype: 'panel',
                        id: 'seaBtnDisplay',
                        items:[
                        {
                            xtype: 'button',
                            pressedCls:'rsBtnClicked',
                            id:'colBtn',
                            iconCls: 'arrow_up',
                            iconMask:true,
                            handler: function(){
                                var minButton = Ext.getCmp('colBtn');
                                var checkoc = minButton.getIconCls();
                                if(checkoc == 'arrow_up')
                                {
                                    minButton.setIconCls('arrow_down')
                                    Ext.getCmp('resultSortWrapper').hide();
                                }
                                else
                                {
                                    minButton.setIconCls('arrow_up')
                                    Ext.getCmp('resultSortWrapper').show();
                                }
                            }  
                        }]
                    }]
                },
                {
                    xtype: 'panel',
                    id: 'naviBtnPan',
                    layout: {
                        type: 'hbox'
                    },
                    items:[
                    {                        
                        xtype: 'label',
                        id:'resultrangeBtn',
                        html: 'Result 1 - 10 of ',
                        action: 'findresult'
                    },
                    {
                        xtype: 'button',
                        id:'naviBtnNCus',
                        cls: 'naviBtnNPCus',
                        pressedCls:'rsBtnClicked',
                        iconMask:true,
                        iconCls: 'arrow_right',
                        action:'getnextResult',
                        docked: 'right'
                    },
                    {
                        xtype: 'button',
                        pressedCls:'rsBtnClicked',
                        id:'naviBtnPCus',
                        cls: 'naviBtnNPCus',
                        iconMask:true,
                        iconCls: 'arrow_left',
                        action:'getprevResult',
                        docked: 'right'
                    }
                    ]
                }]
            }]
        },
        {
            xtype: 'resultpage'
        }]        
    }
});